package com.tengju.motivation.domain.model.performance;

import java.util.List;

public interface PerformanceObjectiveRepository {

    List<PerformanceObjective> getByObjectIdAndType(
            List<PerformanceObjectiveObjectId> objectIds,
            PerformanceObjectiveTypeEnum type,
            Integer firstMonth, Integer lastMonth);

    List<PerformanceObjective> getByObjectIdAndKeysAndType(PerformanceObjectiveObjectId objectId, List<String> keys,
                                                           PerformanceObjectiveTypeEnum type,
                                                           Integer startTime, Integer endTime);

    int add(PerformanceObjective performanceObjective);

    void batchAdd(List<PerformanceObjective> performanceObjectives);

    int batchRemove(PerformanceObjectiveTypeEnum type, Integer startTime, Integer endTime);

    void batchRemoveByIdCodeAndKeysAndType(PerformanceObjectiveObjectId objectId, List<String> keys, PerformanceObjectiveTypeEnum type, Integer startTime, Integer endTime);

    int remove(List<PerformanceObjectiveId> performanceObjectiveIdList);

    int removeByRelationId(Long relationId);

    int getCommonListTotal(Integer startTime, Integer endTime,
                           Long chiefId,
                           Integer performanceObjectiveType,
                           Long performanceObjectiveObjectId);

    int getListTotal(Integer startTime, Integer endTime,
                     Long chiefId,
                     Integer performanceObjectiveType,
                     Long performanceObjectiveObjectId);

    List<PerformanceObjectiveObjectId> getObjectIdList(Integer startTime, Integer endTime,
                                                       Long chiefId,
                                                       Integer performanceObjectiveType,
                                                       Long performanceObjectiveObjectId,
                                                       Integer offset, Integer limit);

    int getActivityListTotal(MotivationActivityConfigId activityId,
                             Long chiefId,
                             PerformanceObjectiveTypeEnum typeEnum,
                             Long performanceObjectiveObjectId);

    List<PerformanceObjectiveObjectId> getRelationObjectIdList(Long relationId,
                                                               Long chiefId,
                                                               PerformanceObjectiveTypeEnum typeEnum,
                                                               Long performanceObjectiveObjectId,
                                                               Integer offset, Integer limit);

    List<PerformanceObjectiveTotal> getPerformanceObjectiveTotalByRelationId(Long relationId);

    int updateByRelationId(Long relationId, Integer startTime, Integer endTime);
}
